'call MakeAppData(1)
dim siteMapstr,nowCatid,catObj
call Tpl.Assign("SectedCatID",GetOne("select top 1 [cat_id] from [L_info] where [info_id]=" & killint( Tpl.GetValue("ItemID") ,0,0,10)))
nowCatid= Tpl.GetValue("SectedCatID")


Tpl.Assign "CataBar",OutCatalogeBar(nowCatid,"ID")
siteMapstr= "<Nodes>"
siteMapstr=siteMapstr & "<Node><name>首页</name><href>"& Tpl.GetValue("BaseURI") &"</href></Node>"
siteMapstr=siteMapstr & GetPathXml( nowCatid )
siteMapstr=siteMapstr & "</Nodes>"

call Tpl.AssignStr("YourSiteBar",siteMapstr,"cache\xsl\yoursite.xsl")
call Tpl.AssignFile("ItemInfoDetails", "cache\xml\docs\"& Tpl.GetValue("ItemID") &".xml" ,"cache\xsl\item.xsl")


call Tpl.AssignStr("RelativeInfoLists",GetTopSubject(10,24,NoLockedTopn, Tpl.GetValue("SectedCatID") ), "cache\xsl\top-subject.xsl")

call Tpl.AssignStr("RelativeReplyLists",GetTopReply(10,24,NoReplyList,  " " & nowCatid & " ,0 "), "cache\xsl\top-reply.xsl")



Dim oReply,ainfoarr,page
Set oReply = new Reply
oReply.PThisMdb	= ConstDBtablearr(3)
oReply.pPageLimit	= 100
page = killint( Tpl.GetValue("Page"),1,1,10)
ainfoarr = oReply.GetLimitInfo(page,"[info_id]=" & Tpl.GetValue("ItemID"))
call Tpl.AssignStr("ItemReplyLists",GetXml(ainfoarr),"cache\xsl\replylists.xsl")

Tpl.AssignStr "ReplyFormBox","<Root><PostURI><![CDATA["&  Tpl.GetValue("BaseURI") &"]]></PostURI><ID>"& Tpl.GetValue("ItemID") &"</ID></Root>","cache\xsl\reply-box.xsl"

Dim oInfo,allResults
Set oInfo = new Info
oInfo.PInfoMdb	= ConstDBtablearr(1)
oInfo.pPageLimit=  15 
Tpl.Assign "Title", oInfo.GetTitle( Tpl.GetValue("ItemID") )& " - " & IniTitle




if NeedHtmlPage then Call WriteTo(Tpl.GetValue("BasePath") & Tpl.GetValue("ItemPath")  ,Tpl.Fetch( "cache\cemplate\item.html"))
